<style scoped>
.article_details {
    background-color:#fff;
    padding-bottom:0.2rem;
}

.article-details-info {
    font-family: PingFangSC-Regular;
    font-size: 0.28rem;
    color: #000000;
    text-align: justify;
    line-height: 0.4rem;
    text-indent:0.48rem;
}

.article-details-info img{
    width:6.9rem;
    height: auto;
    margin-bottom: 0.1rem;
}

.article-details-img {
    width:6.9rem;
    height: 4.26rem;
    background-color:#39a9ed;
    margin-bottom:0.2rem;
}

.article-details-img img {
    width:100%;
    height: 100%;
}

.article-details-cont {
    padding:0.2rem 0.3rem 0;
}
</style>

<template>
    <div class="article_details">
        <van-nav-bar  :title="title" left-text="返回" right-text="" left-arrow @click-left="onClickLeft" class="fixed"/>
        <div class="article-details-cont mt46">
            <!-- <div class="article-details-img"><img :src="img" alt=""></div> -->
            <div class="article-details-info" v-html="content"> </div>
        </div>
    </div>
</template>
<script>
import {getResponse, getResponses} from "../api"

export default {
    data(){
        return {
            img:'',
            title:'',
            content:''
        }
    },
    
    methods:{
        onClickLeft() {
            this.$router.go(-1)
        },

        //寺庙列表
        async articleDetails(id) {	
            const data = await getResponses(`/fochina/query/monasterydetail/json`,{'monasteryid':id})
            
            
            if(data.code === '0000') {
               let idata = data.data

               this.img = idata.showpicture
               this.title = idata.monasteryname
               this.content = idata.content
            } else {
                console.log(data.error)
            }
        }
    },

    mounted(){
        this.articleDetails(this.$route.query.id)
    }
}
</script>
